import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {RegisterComponent} from './page/register/register.component';
import {LoginComponent} from './page/login/login.component';
import {PositionListComponent} from './page/admin/position-list/position-list.component';
import {FindAllPositionsComponent} from './page/find-all-positions/find-all-positions.component';
import {PositionDetailsComponent} from './page/position-details/position-details.component';
import {AppComponent} from './app.component';


// 路由模块
const routes: Routes = [
  {path: '', component: FindAllPositionsComponent},
  { path: 'register', component: RegisterComponent },
  { path: 'login', component: LoginComponent},
  { path: 'findAll/:page', component: FindAllPositionsComponent},
  { path: 'positionDetails/:id', component: PositionDetailsComponent},
]

@NgModule({
  imports: [ RouterModule.forRoot(routes) ],
  exports: [ RouterModule ]
})

export class AppRoutingModule { }
